<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>数据添加</title>
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<link href="css/bootstrap.min.css" rel="stylesheet">

<script type="text/javascript">
$(function() {
	//查询用户信息
	$("#reg").hide();
	$.get("./fillServlet", {}, function(data) {
		//{uid:1,name:'李四'}
		if (data != null && data.length != 0) {
			if(data.username == 'admin'){
				$("#nomake").hide();
				$("#reg").show();
				}
		} 
	});
});

</script>

<style type="text/css">
h1 {
	text-align: center;
}

body {
    background: #F8F8FF;
}

#aaa{
	margin: 20px 0 10px 500px;
}

h2{
	text-align: center;
	margin-top: 80px
}
</style>

</head>
<body>
	<h2 id="nomake">您无操作权限</h2>
	<div class="container" id="reg">
		<div class="row">
			<a class="btn btn-default" href="./first.html" role="button" id='aaa'>返回首页</a>
			<h1>管理员进行数据添加</h1>
		</div>
		<form class="form-horizontal" action="./addDataServlet" method="post">
			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">foodid</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" name="foodid" placeholder="输入foodid，值唯一，可以为null">
				</div>
			</div>

			<div class="form-group">
				<label for="inputPassword3" class="col-sm-2 control-label">foodname</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" name="foodname"
						placeholder="输入名称，省的第五个元素起建议加上【**特色】">
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">foodinf</label>
				<div class="col-sm-8">
					<input type="text" class="form-control"  name="foodinf"
						placeholder="输入列表食物简介，字数44以内">
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">fimg1</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" value="./img/list/" name="fimg1"
						placeholder="输入列表img1">
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">fimg2</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" value="./img/list/" name="fimg2"
						placeholder="输入列表img2">
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">fimg3</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" value="./img/list/" name="fimg3"
						placeholder="输入列表img3">
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">fimg4</label>
				<div class="col-sm-8"> 
					<input type="text" class="form-control" value="./img/list/" name="fimg4"
						placeholder="输入列表img4">
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">cityid</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" name="cityid"
						placeholder="输入cityid，注意参考省份id值">
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">detial</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" name="detial"
						placeholder="输入detial，字数70-90">
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">buyurl</label>
				<div class="col-sm-8">
					<textarea class="form-control" rows="3" placeholder="输入购买链接" name="buyurl"></textarea>
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">history</label>
				<div class="col-sm-8">
					<textarea class="form-control" rows="5" placeholder="输入小吃历史" name="history"></textarea>
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">charactor</label>
				<div class="col-sm-8">
					<textarea class="form-control" rows="5" name="charactor"
						placeholder="输入小吃特点，换行加<br>"></textarea>
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">domake</label>
				<div class="col-sm-8">
					<textarea class="form-control" rows="5"  name="domake" placeholder="输入做法，换行加<br>"></textarea>
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">img1</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" value="./img/detialed/" name="img1"
						placeholder="输入详情img1">
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">img2</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" value="./img/detialed/" name="img2"
						placeholder="输入详情img2">
				</div>
			</div>

			<div class="form-group">
				<label for="inputEmail3" class="col-sm-2 control-label">img3</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" value="./img/detialed/" name="img3"
						placeholder="输入详情img3">
				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-offset-5 col-sm-6">
					<input type="submit" value="提交">
				</div>
			</div>
		</form>
		
	</div>



</body>
</html>